﻿#region

using System;
using System.Windows;
using System.Windows.Controls;

#endregion

namespace Radovici.Ctrls.Facebook
{
    public class FacebookMessage : ContentControl
    {
        public static readonly DependencyProperty ChangeDateProperty = DependencyProperty.Register("ChangeDate",
                                                                                                   typeof(DateTime),
                                                                                                   typeof(
                                                                                                       FacebookMessage),
                                                                                                   new PropertyMetadata(
                                                                                                       DateTime.Now));

        public static readonly DependencyProperty UserProperty = DependencyProperty.Register("User",
                                                                                             typeof(
                                                                                                 FacebookApi.
                                                                                                 FacebookUser),
                                                                                             typeof(FacebookMessage),
                                                                                             new PropertyMetadata(null));

        public FacebookMessage()
        {
            DefaultStyleKey = typeof (FacebookMessage);
        }

        public FacebookApi.FacebookUser User
        {
            get { return (FacebookApi.FacebookUser) GetValue(UserProperty); }
            set { SetValue(UserProperty, value); }
        }

        // Using a DependencyProperty as the backing store for User.  This enables animation, styling, binding, etc...

        public DateTime ChangeDate
        {
            get { return (DateTime) GetValue(ChangeDateProperty); }
            set { SetValue(ChangeDateProperty, value); }
        }

        // Using a DependencyProperty as the backing store for ChangeDate.  This enables animation, styling, binding, etc...
    }
}